<?php
include("_mysql.php");
include("_settings.php");
include("_functions.php");
$json_result = array();
$result =  mysql_query("SELECT orders_bets.*, category.name As name  FROM orders_bets LEFT JOIN category ON orders_bets.category = category.id ORDER BY orders_bets.id DESC LIMIT 0,1")  or die(mysql_error());
if ($result) {
	$item = mysql_fetch_assoc($result);
	$title = cut($item['title'], 40);
	$json_result["id"] = $item["id"];
	$json_result["content"] = <<<EOD
				<li class="clearafter" id="{$item["id"]}">
	<div class="left col-1">
		<a href="#"><img src="{$item["image"]}" /> </a>						
	</div>
	
	<div class="left col-2">
		<p class="description">
			<a href="#">{$title}</a>
		</p>						
	</div>
	
	<div class="right col-3 content-center">
		<div class="latest-gigs-price">
			\${$item["price"]}
		</div>
		<div class="catname">
			<a href="#">{$item["name"]} </a>
		</div>
		<div class="rating">						
			<div style="width: 80%;">&nbsp;</div>							
		</div>
	</div>
</li>
EOD;
}

echo json_encode($json_result);
?>